ga.view.billard.nodes
Class BillardObjectNode<T extends IAgeIndividual<T>>

java.lang.Object
  extended by com.jme3.scene.Spatial
      extended by com.jme3.scene.Node
          extended by ga.view.billard.nodes.BillardObjectNode<T>
Type Parameters:
T - The generic type of the individuals.
All Implemented Interfaces:
com.jme3.asset.CloneableSmartAsset, com.jme3.collision.Collidable, com.jme3.export.Savable, java.lang.Cloneable

public class BillardObjectNode<T extends IAgeIndividual<T>>
extends com.jme3.scene.Node

Object node the for BillardEvaluationState.

Since:
12.08.2012
Author:
Stephan Dreyer

Nested Class Summary
 
Nested classes/interfaces inherited from class com.jme3.scene.Spatial
com.jme3.scene.Spatial.BatchHint, com.jme3.scene.Spatial.CullHint
 
Field Summary
private  float alpha
           
private  float colorVal
           
private  com.jme3.bullet.control.RigidBodyControl control
           
private  boolean fadeIn
           
private  boolean fadeOut
           
private  com.jme3.scene.Geometry geometry
           
private  T individual
           
private  float relSize
           
 
Fields inherited from class com.jme3.scene.Node
children
 
Fields inherited from class com.jme3.scene.Spatial
batchHint, controls, cullHint, frustrumIntersects, key, localLights, localTransform, name, parent, queueBucket, queueDistance, refreshFlags, RF_BOUND, RF_LIGHTLIST, RF_TRANSFORM, shadowMode, userData, worldBound, worldLights, worldTransform
 
Constructor Summary
BillardObjectNode(com.jme3.asset.AssetManager assetManager, com.jme3.scene.Geometry s, T individual)
          Instantiates a new billard object node.
 
Method Summary
 void doFadeIn()
          Indicates that the node has been created.
 void doFadeOut()
          Indicates that the node has beeing destroyed.
 void doSelect()
          Indicates that the node has been selected.
 com.jme3.scene.Geometry getGeometry()
          Gets the geometry.
 T getIndividual()
          Gets the individual.
 boolean mustRemove()
          Checks if the node should be removed.
protected  void setParent(com.jme3.scene.Node parent)
           
 java.lang.String toString()
           
 void updateLogicalState(float tpf)
           
 void updateSizeByAge()
          Resizes the node depending on the age.
 
Methods inherited from class com.jme3.scene.Node
attachChild, attachChildAt, breadthFirstTraversal, clone, collideWith, deepClone, depthFirstTraversal, descendantMatches, descendantMatches, descendantMatches, detachAllChildren, detachChild, detachChildAt, detachChildNamed, getChild, getChild, getChildIndex, getChildren, getQuantity, getTriangleCount, getVertexCount, hasChild, read, setLightListRefresh, setLodLevel, setMaterial, setModelBound, setTransformRefresh, swapChildren, updateGeometricState, updateModelBound, updateWorldBound, write
 
Methods inherited from class com.jme3.scene.Spatial
addControl, addLight, breadthFirstTraversal, center, checkCulling, clone, forceRefresh, getBatchHint, getControl, getControl, getCullHint, getKey, getLastFrustumIntersection, getLocalBatchHint, getLocalCullHint, getLocalLightList, getLocalQueueBucket, getLocalRotation, getLocalScale, getLocalShadowMode, getLocalToWorldMatrix, getLocalTransform, getLocalTranslation, getName, getNumControls, getParent, getQueueBucket, getShadowMode, getUserData, getUserDataKeys, getWorldBound, getWorldLightList, getWorldRotation, getWorldScale, getWorldTransform, getWorldTranslation, hasAncestor, localToWorld, lookAt, matches, move, move, removeControl, removeControl, removeFromParent, removeLight, rotate, rotate, rotateUpTo, runControlRender, scale, scale, setBatchHint, setBoundRefresh, setCullHint, setKey, setLastFrustumIntersection, setLocalRotation, setLocalRotation, setLocalScale, setLocalScale, setLocalScale, setLocalTransform, setLocalTranslation, setLocalTranslation, setName, setQueueBucket, setShadowMode, setUserData, updateWorldLightList, updateWorldTransforms, worldToLocal
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

individual

private final T extends IAgeIndividual<T> individual

geometry

private final com.jme3.scene.Geometry geometry

colorVal

private float colorVal

relSize

private float relSize

alpha

private float alpha

fadeOut

private boolean fadeOut

fadeIn

private boolean fadeIn

control

private final com.jme3.bullet.control.RigidBodyControl control
Constructor Detail

BillardObjectNode

public BillardObjectNode(com.jme3.asset.AssetManager assetManager,
                         com.jme3.scene.Geometry s,
                         T individual)
Instantiates a new billard object node.

Parameters:
assetManager - the asset manager
s - the s
individual - the individual
Since:
12.08.2012
Method Detail

updateLogicalState

public void updateLogicalState(float tpf)
Overrides:
updateLogicalState in class com.jme3.scene.Node

setParent

protected void setParent(com.jme3.scene.Node parent)
Overrides:
setParent in class com.jme3.scene.Spatial

doSelect

public void doSelect()
Indicates that the node has been selected.

Since:
12.08.2012

doFadeOut

public void doFadeOut()
Indicates that the node has beeing destroyed.

Since:
12.08.2012

doFadeIn

public void doFadeIn()
Indicates that the node has been created.

Since:
12.08.2012

updateSizeByAge

public void updateSizeByAge()
Resizes the node depending on the age.

Since:
12.08.2012

mustRemove

public boolean mustRemove()
Checks if the node should be removed.

Returns:
true if the node should be removed.
Since:
12.08.2012

getIndividual

public T getIndividual()
Gets the individual.

Returns:
the individual
Since:
12.08.2012

getGeometry

public com.jme3.scene.Geometry getGeometry()
Gets the geometry.

Returns:
the geometry
Since:
12.08.2012

toString

public java.lang.String toString()
Overrides:
toString in class com.jme3.scene.Spatial